package com.xixi.example.provider;

import com.xixi.core.rpc.bootstrap.ProviderBootstrap;
import com.xixi.core.rpc.model.ServiceRegisterInfo;
import com.xixi.example.common.service.UserService;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: zxh
 * @date: 2024/8/21 17:18
 * @description: 服务提供者示例
 */
public class ProviderExample {

	public static void main(String[] args) {
		// 要注册的服务
		List<ServiceRegisterInfo<?>> serviceRegisterInfoList = new ArrayList<>();
		ServiceRegisterInfo<UserService> serviceRegisterInfo = new ServiceRegisterInfo<>(UserService.class.getName(), UserServiceImpl.class);
		serviceRegisterInfoList.add(serviceRegisterInfo);

		// 服务提供者初始化
		ProviderBootstrap.init(serviceRegisterInfoList);
	}
}
